package com.example.baselibrary.presenter;

import android.content.Context;

import com.example.baselibrary.iview.BaseView;
import com.example.baselibrary.utils.NetCheckUtil;

import static com.example.baselibrary.common.BaseApplication.context;

/**
 * MVP中P层 基类 by zqq on 2018/6/11.
 */

public class BasePresenter<T extends BaseView> {

    public T mView;
//    private Context context;


    //    BaseApplication.context
    protected Boolean checkNetWork(){
        if (NetCheckUtil.isConnectNet(context)) {
            return true;
        }
        mView.onError("网络不可用");
        return false;
    }

}
